In a video encoding device, it is general to apply a deblocking filter to a local decoded image in order to compensate for a coding distortion in the local decoded image, while in order to reduce mosquito noise which cannot be compensated for by simply applying the deblocking filter, there is a case of applying an SAO arithmetic operation, which is a sample adaptive offset, to the local decoded image. The arithmetic contents of the SAO arithmetic operation are determined from the type of SAO (e.g., an edge offset or a band offset) and an offset value.
In the following nonpatent reference 1, a video encoding device that, when determining the type of SAO and the offset value, in order to provide an improvement in the image quality and the coding efficiency, compares an original image with an image after the SAO arithmetic operation on the basis of the concept of RDO (Rate-Distortion Optimization), to select the type of SAO and the offset value which provide the highest similarity between the original image and the image after the SAO arithmetic operation is disclosed.